import { request } from './request';
export function getDetailInfo(id) {
    return request({
        url: '/detail',
        params: {
            iid: id
        }
    })
}
export function getRecommend() {
    return request({
      url: '/recommend'
    })
  }
export class GoodsInfo {
    constructor(itemInfo, columns, services) {
        this.title = itemInfo.title;
        this.highNowprice = itemInfo.highNowPrice;
        this.lowPrice = itemInfo.lowPrice;
        this.discountDesc = itemInfo.discountDesc;
        this.columns = columns;
        this.services = services;
    }
}
export class Shop {
    constructor(shopInfo) {
        this.name = shopInfo.name;
        this.logo = shopInfo.shopLogo;
        this.sellCount = shopInfo.cSells;
        this.allGoods = shopInfo.cGoods;
        this.score = shopInfo.score;

    }
}
export class GoodsParams {
    constructor(info, rules) {
        // 注: images可能没有值(某些商品有值, 某些没有值)
        this.image = info.images ? info.images[0] : '';
        this.infos = info.set;
        this.rules = rules.tables[0];
    }
}

export class Comment{
    constructor(list){
        this.content = list.content;
        this.style = list.style;
        this.images = list.images;
        this.user = list.user;
        this.date = list.created;
    }
}